<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta name="keywords" content="爽客网旅游，贵阳旅游，旅游" />
<meta name="description" content="爽客网旅游，贵阳旅游，旅游" />
<title>地图 - 爽客网</title>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/base.js"></script>
</head>

<body>
	<c:if test="${not empty lng && not empty lat}">
		<div id="baidu_map" style="width: 100%;height: 100px;"></div>
		<script type="text/javascript">
			$(function(){
					var clientHeight = document.documentElement.clientHeight;
					$("#baidu_map").css("height",clientHeight);
					var map = new BMap.Map("baidu_map");
					map.enableScrollWheelZoom();
					map.enableContinuousZoom();
					var point = new BMap.Point("${lng}", "${lat}");    // 创建点坐标
					map.addControl(new BMap.NavigationControl());
				    map.centerAndZoom(point, 17);                     // 初始化地图,设置中心点坐标和地图级别。
				    
				    var marker = new BMap.Marker(point);
			        map.addOverlay(marker);
			});
		</script>
	</c:if>
	<c:if test="${empty lng || empty lat}">
		<div>地图信息为空</div>
	</c:if>
</body>
</html>
